/*
 *  $Id: Tsunami.cs 1051 2010-05-18 22:10:41Z thenn.erannor $
 *	This file is a part of Ragima CCG.
 *	(C) 2008 Ragima development group.
 *
 *	Licensed under the terms of the GNU GPL License version 2.
 *
 */

namespace Ragima.Cards001.Water.Spells {
    public class Tsunami: SpellCard {
        public Tsunami(): base("001_w_s_tsunami") {
            Level = CompleteLevel.Final;
            Element = ElementType.Water;
            Value = 100;
            AllowInOffence = true;
            AllowInDefence = true;
            AddManaCost(ElementType.Water, 6);
        }

        public override void DoAction(TargetArgs args) {
            DoTsunami(args.Player, args.Player);
            DoTsunami(args.Player, args.Player.Enemy);
        }
        private void DoTsunami(Player caster, Player owner) {
            foreach (Creature creature in owner.GetCreatures())
                if (!creature.IsAquatic)
                    creature.DamageBy(NewDamage(caster, 4));
        }
    }
}
